package com.meitianhui.convenitenbuy.module.order.http;


import com.meitianhui.convenitenbuy.base.BaseResponse;
import com.meitianhui.convenitenbuy.module.order.model.bean.EmptyInfo;
import com.meitianhui.convenitenbuy.module.order.model.bean.FightGroupDetailPerson;
import com.meitianhui.convenitenbuy.module.order.model.bean.FightGroupOrderDetail;
import com.meitianhui.convenitenbuy.module.order.model.bean.OrderInfo;
import com.meitianhui.convenitenbuy.module.order.model.bean.UsableCash;

import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by Administrator on 2017/11/1.
 */

public interface OrderApi {

    /** 获取我的订单 */
    @POST("opsorder")
    Observable<BaseResponse<OrderInfo>> getOrder(@Query("user_token") String userToken, @Query("service") String service, @Query("page") String page, @Query("params") String params);

    /** * 获取“积分兑”分类下的订单。 */
    @POST("goods")
    Observable<BaseResponse<OrderInfo>> getBPPOrder(@Query("app_token") String appToken, @Query("service") String service, @Query("page") String page, @Query("params") String params);

    /** 获取拼团领详情信息 */
    @POST("opsorder")
    Observable<BaseResponse<FightGroupOrderDetail>> getFightGroupDetail(@Query("user_token") String userToken, @Query("service") String service, @Query("params") String params);

    /** 获取拼团领参团人 */
    @POST("opsorder")
    Observable<BaseResponse<FightGroupDetailPerson>> getFightGroupDetailPerson(@Query("user_token") String userToken, @Query("service") String service, @Query("page") String page, @Query("params") String params);

    /** 确认订单 */
    @POST("opsorder")
    Observable<BaseResponse<EmptyInfo>> confirmOrder(@Query("user_token") String userToken, @Query("service") String service, @Query("params") String params);

    /** 获取未用用户资产 */
    @POST("finance")
    Observable<BaseResponse<UsableCash>> getUsableCash(@Query("user_token") String userToken, @Query("service") String server, @Query("params") String params);

}
